﻿using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Orleans;

namespace IOP.Orleans.Client
{
    /// <summary>
    /// 奥尔良服务构建者
    /// </summary>
    public class OrleansServiceBuilder : IOrleansServiceBuilder
    {
        /// <summary>
        /// 服务集合
        /// </summary>
        public IServiceCollection Services { get; }
        /// <summary>
        /// 奥尔良客户端构建者
        /// </summary>
        public IClientBuilder ClientBuilder { get; }
        /// <summary>
        /// 主机构建上下文
        /// </summary>
        public HostBuilderContext HostBuilderContext { get; }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="services"></param>
        /// <param name="clientBuilder"></param>
        /// <param name="hostBuilderContext"></param>
        public OrleansServiceBuilder(IServiceCollection services, IClientBuilder clientBuilder, HostBuilderContext hostBuilderContext)
        {
            Services = services;
            ClientBuilder = clientBuilder;
            HostBuilderContext = hostBuilderContext;
        }
    }
}
